package com.dcbdemo.springbootvuedemo.controller;

import com.dcbdemo.springbootvuedemo.domain.User;
import org.springframework.web.bind.annotation.*;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO
 * @date 2021/7/13 15:26
 */
@RestController
public class Login2Controller {

    @CrossOrigin
    @PostMapping("/login")
    public String login(@RequestBody User user){
        String username = user.getUsername();
        String password = user.getPassword();
        if(username.equals("admin") && password.equals("a123456")){
            System.out.println("122222222222222222222222222222222212121212");
            return "ok";
        }else{
            return "not ok";
        }



    }
}
